home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d19 / ai.arc / AICHAT.DOC < prev    next >
Text File  |  1991-07-12  |  20KB  |  442 lines

  1.   AICHAT.DOC                                                   Page 1 of 8
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                    ******************************************
  8.                    *                                        *
  9.                    *               AICHAT.EXE               *
  10.                    *                                        *
  11.                    * Created 23/7/90 by Avatar (Andrew Pam) *
  12.                    *   Sysop of S.I.G. BBS +61 3 888-8846   *
  13.                    *                                        *
  14.                    *         Ver 2.3 written 7/4/91         *
  15.                    * Copyright (c) 1991 Serious Cybernetics *
  16.                    *                                        *
  17.                    ******************************************
  18.  
  19.  
  20.  
  21.  
  22.  
  23.                              Table of Contents
  24.                              ~~~~~~~~~~~~~~~~~
  25.  
  26.            Table of Contents  . . . . . . . . . . . . . . . . . 1
  27.  
  28.            Legal Notice . . . . . . . . . . . . . . . . . . . . 2
  29.  
  30. |          Vertical Bars  . . . . . . . . . . . . . . . . . . . 2
  31.  
  32.            Introduction . . . . . . . . . . . . . . . . . . . . 2
  33.  
  34.            Installation . . . . . . . . . . . . . . . . . . . . 3
  35.  
  36.            Status Line  . . . . . . . . . . . . . . . . . . . . 4
  37.  
  38.            Local Commands . . . . . . . . . . . . . . . . . . . 4
  39.  
  40.            Control Characters . . . . . . . . . . . . . . . . . 4
  41.  
  42.            Entering AIchat  . . . . . . . . . . . . . . . . . . 5
  43.  
  44.            Sysop Hours  . . . . . . . . . . . . . . . . . . . . 5
  45.  
  46.            Exiting AIchat . . . . . . . . . . . . . . . . . . . 5
  47.  
  48.            Customising AIchat . . . . . . . . . . . . . . . . . 6
  49.  
  50.            The AI algorithm . . . . . . . . . . . . . . . . . . 7
  51.  
  52.            Colours  . . . . . . . . . . . . . . . . . . . . . . 8
  53.  
  54.            Technical Notes  . . . . . . . . . . . . . . . . . . 8
  55.  
  56.            Future Enhancements  . . . . . . . . . . . . . . . . 8
  57.  
  58.  
  59.   AICHAT.DOC                                                   Page 2 of 8
  60.  
  61.   Legal Notice
  62.   ~~~~~~~~~~~~
  63.  
  64.   This program is Shareware.  You may distribute it as widely as you wish.
  65.   You may not modify AICHAT.EXE or this file AICHAT.DOC in any way, nor
  66.   may you omit either file or the sample AICHAT.AI file.  You may not
  67.   include any other files as part of the AIchat distribution package, and
  68.   you may not charge more than a fair and reasonable copying fee.  If you
  69.   continue using this program on an ongoing basis after having tested it,
  70.   you must send $10 (A$20 if outside Australia) or more to the address at
  71. | the end of this documentation with your name and (if a Sysop) the name
  72. | of your bulletin board.
  73.  
  74. | You will receive a disk containing the latest version of the program
  75. | registered in your name and a selection of other Freeware and Shareware
  76. | software from Serious Cybernetics.  Please specify the size and shape of
  77. | disk you require when ordering.  No warranty of any kind is expressed or
  78. | implied, and the author will not be held liable for any damages,
  79. | consequential or otherwise, caused by the use, misuse or abuse of this
  80. | program.  We told you the rules, now don't forget them!  Failure to
  81. | abide by these terms constitutes a breach of copyright law.  Nyaah!
  82.  
  83.  
  84.  
  85. | Vertical Bars
  86.   ~~~~~~~~~~~~~
  87.  
  88. | Lines in this document with a vertical bar "|" in the left margin have
  89. | been added or modified since the previous version 2.2 release.
  90.  
  91.  
  92.  
  93.   Introduction
  94.   ~~~~~~~~~~~~
  95.  
  96.   AIchat came about because I was unimpressed by the existing "robot
  97.   sysops", most of which appeared to be based on Eliza.  Joseph Weizenbaum
  98.   wrote Eliza to simulate a Rogerian psychologist, not a sysop, and unless
  99.   you know any sysops who believe in practising Rogerian psychology on
  100.   their users, I don't find it a very convincing simulation.  I decided to
  101.   set about writing a program that would be more interesting to chat to.
  102.  
  103.   The underlying paradigm of AIchat is that it simulates a sysop, who has
  104.   a "train of thought" (or CURRENT TOPIC) at any given time and will
  105.   endeavour to involve the user in a discussion.  However, if the user
  106.   changes topics or mentions something upon which AIchat can make a witty
  107.   remark, it will happily do so.  After somewhere between 2 and 12 minutes
  108.   or when it can no longer find any topics of interest to discuss with the
  109.   user, it will "get bored" and make an excuse to leave.
  110.  
  111.   AIchat is programmed to make a few typing mistakes from time to time in
  112.   order to simulate a human typist.  There is a 50:1 chance on any given
  113.   phrase that it will forget to use the shift key and type everything in
  114.   lowercase.  There is also a 50:1 chance on any given character that it
  115.   will accidentally make a typo, either by typing the wrong character
  116.   altogether or by getting two adjacent characters reversed, and a 10:1
  117.   chance that it won't notice and will fail to correct the mistake.
  118.  
  119.   AICHAT.DOC                                                   Page 3 of 8
  120.  
  121.   Installation
  122.   ~~~~~~~~~~~~
  123.  
  124.   AIchat is designed to work with all bulletin board software.  It does
  125. | not require access to any files maintained by the BBS, but it is capable
  126. | of reading RBBS style DORINFO1.DEF files (also used by Remote Access,
  127. | SuperBBS and QuickBBS), WWIV style CHAIN.TXT files, and GAP style
  128. | DOOR.SYS files.  Multi-user operation is now fully supported.
  129.  
  130.   For a summary of the command line parameters, run AICHAT.  This will
  131.   produce the following usage guide:
  132.  
  133.   Usage:   AICHAT {options ...} <username> {options ...}
  134.  
  135.   Options: /<baud>  where <baud> = 0 for local
  136.            /<port>  where <port> = 1 to 4
  137.            /A       => auto AI chat (no yell)
  138.            /C       => sysop initiated chat
  139. |          /D       => read GAP style DOOR.SYS file
  140. |          /G<ANSI> where <ANSI> = 0 to 3
  141. |          /R       => read RBBS style DORINFO1.DEF file
  142. |          /W       => read WWIV style CHAIN.TXT file
  143. |          /W<name> where <name> = filename of WWIV style file
  144.  
  145.   To test AIchat locally, the only parameter required is your name, since
  146.   AIchat defaults to local operation with ANSI colour enabled.  A baud
  147.   rate other than zero will enable remote operation using the specified
  148.   communications port.  It is a fatal error to specify a non-initialised,
  149.   disconnected or otherwise invalid port since AIchat assumes that a user
  150.   is already online and makes no attempt to check that the port is
  151.   operational.
  152.  
  153. | The /A parameter indicates that AIchat was invoked by the user as an AI
  154. | program and not to chat to the sysop, and will start the program in AI
  155. | mode.  The /C parameter indicates that AIchat was invoked by the sysop
  156. | as a normal chat program and not by the user, and will start the program
  157. | in chat mode.  On registered copies, /C will also skip displaying the
  158. | credits when AIchat is executed.  If either of these parameters is used
  159. | AIchat will not attempt to attract the sysop's attention, so ensure you
  160. | never allow the /C parameter to be invoked by users.
  161.  
  162. | The /D, /R and /W parameters will automatically determine the user's
  163. | name, baud rate, port, ANSI capability and time remaining, so no other
  164. | parameters are required when they are is used; this is therefore the
  165. | recommended option where possible.  However, the other options will
  166. | override these settings if placed later on the command line.  The /G,
  167. | /G0 and /G2 options will disable ANSI facilities and use only standard
  168. | ASCII text.
  169.  
  170.   The use of a FOSSIL (Fido-Opus-Seadog Standard Interface Layer)
  171.   communications driver such as David Nugent's BNU or Ray Gwinn's X00 is
  172.   highly recommended when using AIchat remotely, especially at speeds of
  173.   2400 BPS and higher.  Characters are unlikely to be lost at normal
  174.   typing speeds, but if macros are used at the higher speeds they are very
  175.   likely to lose characters if a FOSSIL is not used.  AIchat will
  176.   automatically detect the presence of a FOSSIL.
  177.  
  178.   AICHAT.DOC                                                   Page 4 of 8
  179.  
  180.   Status Line
  181.   ~~~~~~~~~~~
  182.  
  183.   While AIchat is running a status line will be displayed on the bottom
  184.   line of the screen in reverse video.  From left to right, the status
  185.   line gives the following information:
  186.  
  187.   * The version number of this release of AIchat
  188.   * LOCAL or the current communication port and baud rate
  189.   * The current user's full name (if known)
  190.   * THINK if AIchat is currently "thinking aloud"
  191.   * LOG if AIchat is currently logging the chat to AICHAT.LOG
  192. | * The time left until AIchat "gets bored", [CHATTING], or [YELLING]
  193.  
  194.  
  195.  
  196.   Local Commands
  197.   ~~~~~~~~~~~~~~
  198.  
  199.   The following local commands are currently provided by AIchat:
  200.  
  201.   Alt-A   AI mode
  202.   Alt-C   Chat mode
  203.   Alt-J   Jump to DOS
  204.   Alt-L   Logging toggle
  205.   Alt-T   "Thinking aloud" toggle
  206.   PageUp  Add one minute to AI chat time
  207.   PageDn  Subtract one minute from AI chat time
  208.   Escape  Terminate chat and exit program.
  209.  
  210.   Using Alt-A and Alt-C to change modes is totally invisible to the user,
  211.   so you can break into AIchat either to converse with a user yourself or
  212.   just long enough to insert your own witty remarks!
  213.  
  214.  
  215.  
  216.   Control Characters
  217.   ~~~~~~~~~~~~~~~~~~
  218.  
  219.   The following control characters are currently supported by AIchat:
  220.  
  221.   Crtl-G  Bell            (does not ring at local console
  222.                            if typed by remote user in AI mode)
  223.   Ctrl-H  Backspace       (will not backspace beyond first column)
  224.   Ctrl-I  Tab             (uses standard 8 character tab stops)
  225.   Ctrl-J  Line Feed       (scrolls at bottom of screen)
  226.   Ctrl-K  Reverse LF      (will not move beyond top of screen)
  227.   Ctrl-L  Clear Screen
  228.   Ctrl-M  Carriage Return
  229.   Ctrl-N  Home Cursor     (moves cursor to top left corner)
  230.   Ctrl-U  Cursor Forward  (will not move beyond last column)
  231.   Ctrl-X  Cancel          (deletes the entire line)
  232.  
  233.   All escape sequences from the user except ANSI/VT100 cursor movements
  234.   are currently ignored.  The "arrow" cursor keys are fully supported and
  235.   the Home and Ctrl-Home keys perform Ctrl-N and Ctrl-L respectively.
  236.  
  237.   AICHAT.DOC                                                   Page 5 of 8
  238.  
  239.   Entering AIchat
  240.   ~~~~~~~~~~~~~~~
  241.  
  242.   When AIchat is invoked, unless the /A or /C parameters were used, you
  243.   will be greeted by the copyright notice and the following message:
  244.  
  245.   Yelling at Sysop...
  246.   Press ALT-C to chat, ESC to abort
  247.  
  248. | If a SPK: device driver (such as Chris Dunford's SPKR.SYS) is installed
  249. | and a valid PAGE.RA file is in the current directory or (with DOS 3.0
  250. | and later) the same directory as AICHAT.EXE, a tune will be played
  251. | during Sysop hours.  If not, the normal PC "bell" will be rung
  252. | continuously instead.  A PAGE.RA file may consist of lines beginning
  253. | with: "TONE" followed by the desired pitch in hertz and duration in
  254. | hundredths of a second, "WAIT" followed by the duration in hundredths of
  255. | a second, or anything else (which will be ignored).
  256.  
  257.   At this point you can press Alt-C to enter chat mode, Escape to cancel
  258.   the chat with the message "Sysop is not currently available", or any
  259.   other key to proceed immediately to AI mode (useful if you don't intend
  260.   to enter chat mode and want the sysop-summoning sounds stopped swiftly!)
  261.   Alternatively, you can do nothing, in which case after a few seconds the
  262.   program will automatically enter AI mode.
  263.  
  264.   If the current user was using AIchat less than 5 minutes earlier, it
  265.   will cancel the chat as if Escape had been pressed instead of proceeding
  266.   to AI mode.  This prevents users from getting carried away and hogging
  267.   the board (since chatting doesn't use up logon time) and lends some
  268.   badly needed credibility to the program's excuses.
  269.  
  270.  
  271.  
  272.   Sysop Hours
  273.   ~~~~~~~~~~~
  274.  
  275.   The sysop is currently assumed to be available between the hours of 10am
  276.   and 10pm.  This means that outside these hours, AIchat will not make
  277.   sounds to attract the sysop's attention when the user requests a chat.
  278.   The sysop may of course choose to answer the chat anyway if they are
  279.   present, and AIchat will currently never tell the user "Sysop is not
  280.   currently available" except in the circumstances outlined above.
  281.   These hours are not currently customisable.
  282.  
  283.  
  284.  
  285.   Exiting AIchat
  286.   ~~~~~~~~~~~~~~
  287.  
  288.   When AIchat is in AI mode, any phrase containing the letters "BYE",
  289.   "CIAO" or "ADIOS" will cause the program to say goodbye and exit.  These
  290.   keywords are not currently customisable.  Some users have expressed
  291.   difficulty with this, trying words like "quit" and "exit", but at this
  292.   stage I find it more logical to support human ways of ending a
  293.   conversation rather than computer ones.  In chat mode, the only way to
  294.   exit is for the sysop to press Escape on the local keyboard.
  295.  
  296.   AICHAT.DOC                                                   Page 6 of 8
  297.  
  298.   Customising AIchat
  299.   ~~~~~~~~~~~~~~~~~~
  300.  
  301.   AIchat uses a file called AICHAT.AI to control AI mode.  If this file is
  302.   not present or readable when AIchat is run, it will exit with the "Sysop
  303.   is not currently available" message unless run with the /C parameter, in
  304.   which case it will function in chat mode only.  This file is an ASCII
  305.   text file and can be edited with any text editor of your choice in order
  306.   to customise the way in which AI mode responds to user input.  If the
  307.   file is too long for AIchat to process, it will use as much of it as
  308.   possible and will log an error message showing the last topic or keyword
  309.   it was able to read.
  310.  
  311.   AICHAT.AI is structured as a list of TOPICS, each optionally containing
  312.   a list of PHRASES and/or a list of groups of KEYWORDS, each optionally
  313. | containing its own list of PHRASES.  A phrase may currently be up to 255
  314.   characters long, while a topic or keyword is not case sensitive and may
  315.   be any length, although currently only the first 10 characters are
  316.   significant.  Underscores "_" in the topic or keyword will be treated as
  317.   spaces, since actual spaces may be removed by some text editors,
  318.   especially at the end of a line.
  319.  
  320.   A topic is signified by one or more blank lines followed by the name of
  321.   the topic.  Every group of blank lines in the file therefore signifies
  322.   the start of a new topic.  A group of keywords consists of one or more
  323.   keywords on the same line separated by vertical bars "|".  A phrase
  324.   consists of a line of text starting with a digit and a space.  The digit
  325.   indicates the chance of using this phrase relative to any of the other
  326.   phrases in this group.  A zero will result in the phrase being ignored
  327.   by AIchat and may be used to temporarily disable an unwanted phrase.
  328.  
  329. | A line may also start with a plus sign "+" to indicate that it is a
  330. | continuation of the phrase on the previous line.  A phrase may be
  331. | continued on any number of successive lines, but any portion after the
  332. | first 255 characters will be ignored.  Topics and keywords may not be
  333. | continued in this fashion, so invalid continuation lines not part of a
  334. | phrase will also be ignored.
  335.  
  336.   The first topic in the file is the default topic, and has no name.  This
  337.   topic remains in effect until the first blank line in the file, which of
  338.   course signifies the start of the next topic.  All phrases in the
  339.   default topic will be used as random non-sequiturs when AIchat isn't
  340.   discussing any particular topic and has no idea what the user is talking
  341.   about.  All keywords in the default topic will not change the current
  342.   topic under discussion when used.
  343.  
  344.   Topics and keywords will normally only match complete words or phrases.
  345.   However, if the first or last character of a topic or keyword is an
  346.   asterisk "*" it will also match any word or phrase beginning and/or
  347.   ending in the specified topic or keyword.  For example, the keyword
  348.   "eat" will not match the word "great", but the keyword "*eat" will.
  349.   Neither keyword will match the word "greater", but the keywords "great*"
  350.   and "*eat*" will.  The keyword "***" will match any asterisk!
  351.  
  352.   AICHAT.DOC                                                   Page 7 of 8
  353.  
  354.   The AI algorithm
  355.   ~~~~~~~~~~~~~~~~
  356.  
  357.   When AIchat processes user input, if there is a topic currently under
  358.   discussion, it will first search for a keyword in that topic.  If not,
  359.   or if no keyword is found, it will search all the topics to see if any
  360.   of them were mentioned explicitly.  If so, that topic will be treated as
  361.   the current keyword found.
  362.  
  363.   If no keyword has been found yet or a topic explicitly mentioned has no
  364.   unused phrases left, all keywords in AICHAT.AI with unused phrases left
  365.   will be searched in order of occurence.  If a keyword with no unused
  366.   phrases left belonging to a topic which does have unused phrases left is
  367.   found, that topic will be noted as an alternative.  If no other keyword
  368.   is found, this alternative topic will become the current topic,
  369.   otherwise the topic of the keyword found will become the current topic.
  370.  
  371.   If no keyword was found, a phrase in the current topic will be selected.
  372.   If there are no unused phrases left in the current topic, or on a 3:1
  373.   chance, the current topic will be dropped.  If no keyword was found and
  374.   there is no current topic, there is a 10:1 chance of each topic with
  375.   unused phrases left being chosen as the new current topic.
  376.  
  377.   Finally, if no keyword was found and there was no current topic, one of
  378.   the unused phrases in the default topic will be selected; if there are
  379.   none left unused, the program will make an excuse and exit.  If a
  380.   keyword with unused phrases WAS found, one of those will be selected.
  381.  
  382.   If the selected phrase ends in a question mark "?", there is a 20:1
  383.   chance that the user's first name will be appended to the question.  For
  384.   example, "What's up?" will become "What's up, Doc?" if Doc is the
  385.   current user.  If the user's first name is "The", their second name will
  386.   be used instead.
  387.  
  388.   AICHAT.DOC                                                   Page 8 of 8
  389.  
  390.   Colours
  391.   ~~~~~~~
  392.  
  393.   The following colours are used by AIchat when ANSI is enabled:
  394.  
  395.   Light Grey      Default colour
  396.   White           System messages
  397.   Green           "Yelling at Sysop" message
  398.   Cyan            Characters typed by user
  399.   Yellow          Characters typed by sysop or AIchat
  400.   Light Green     AIchat's internal "thoughts"
  401.   Light Red       Fatal error messages
  402.  
  403.   These colours are not currently customisable.
  404.  
  405.  
  406.  
  407.   Technical Notes
  408.   ~~~~~~~~~~~~~~~
  409.  
  410.   AIchat provides a wordwrap facility superior to the one in the Remote
  411.   Access internal chat routines.  Although AIchat will read the BIOS row
  412.   and column information and work correctly on any text resolution with at
  413.   least 80 columns (I often use 132 columns by 60 rows) the wordwrap will
  414.   always ensure that text is wrapped after column 79 to match user
  415.   displays.  Words longer than 20 characters will not be wrapped.
  416.  
  417.   The Alt-J Jump to DOS facility will swap most of AIchat to EMS (if
  418. | available) or disk, leaving only about 8K of RAM in use.
  419.  
  420.   All I/O is done strictly through DOS and BIOS calls without any direct
  421.   hardware access whatsoever, so it should work with any PC system
  422.   compatible at the BIOS level, which is just about everything these days.
  423. | AIchat will also relinquish time slices to multitaskers when possible.
  424.  
  425.  
  426.  
  427.   Future Enhancements
  428.   ~~~~~~~~~~~~~~~~~~~
  429.  
  430.   If you have any further suggestions or comments, feel free to leave a
  431. | message to "Avatar" on my bulletin board, E-mail me as Avatar on
  432. | 199:4242/1@RainbowNet, 3:632/348@FidoNet or 28:4100/32@SIGnet,
  433. | "avatar@csource.oz.au" on the Internet or write to:
  434.  
  435.           Serious Cybernetics
  436.           P.O. Box 409
  437.           Canterbury VIC 3126
  438.           Australia
  439.  
  440.   This program was brought to you courtesy of S.I.G. BBS on +61-3-888-8846
  441.   Share and enjoy!
  442.